Skip to content

NO TICKET: near-universal adoption of release_status and created_at | complete implementation of active_location for the /thing router | async coverage for all endpoints#117

Merged
jirhiker merged 7 commits into
pre-productionfrom
jab-release-status-sample-schema-fixes
Sep 2, 2025
Merged

NO TICKET: near-universal adoption of release_status and created_at | complete implementation of active_location for the /thing router | async coverage for all endpoints#117
jirhiker merged 7 commits into
pre-productionfrom
jab-release-status-sample-schema-fixes

Conversation

@jacob-a-brown

Copy link
Copy Markdown
Contributor

Why

This PR addresses the following problem / context:

  • All responses should have the created_at field
  • All responses, except for those from the /lexicon router, should have a release_status field
  • All POST requests, except for those for the /lexicon router, should require release_status to be filled
  • All PATCH requests, except for those for the /lexicon router, should allow release_status to be edited
  • All responses from the /thing router should include an active_location field
  • All endpoints should be async

How

Implementation summary - the following was changed / added / removed:

  • Added ReleaseMixin to all database models where it was previously absent, except for Lexicon models
  • Created BaseCreateModel, BaseUpdateModel, and BaseResponseModel in /schemas/__init__.py to enable universal fields to be present for all relevant models
  • updated tests for id, created_at, and release_status where appropriate
  • updated tests/test_thing.py for active_location

Notes

Any special considerations, workarounds, or follow-up work to note?

  • create_contact was made more flexible for future model/schema changes

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
api/contact.py 95.79% <100.00%> (ø)
api/group.py 100.00% <100.00%> (ø)
api/lexicon.py 98.82% <100.00%> (ø)
api/location.py 92.30% <100.00%> (ø)
api/observation.py 100.00% <100.00%> (ø)
api/sample.py 100.00% <100.00%> (ø)
api/search.py 97.77% <100.00%> (ø)
api/sensor.py 77.77% <100.00%> (ø)
api/thing.py 98.43% <100.00%> (+0.02%) ⬆️
db/asset.py 100.00% <100.00%> (ø)
... and 25 more

Comment thread db/thing.py
@jirhiker jirhiker merged commit f1f81ad into pre-production Sep 2, 2025
3 checks passed
@jirhiker jirhiker deleted the jab-release-status-sample-schema-fixes branch December 3, 2025 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants